Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move from API keys to route-based authentication for HTTP gateways #1418

Merged
merged 12 commits into from
Sep 9, 2022

Conversation

vponline
Copy link
Contributor

@vponline vponline commented Sep 5, 2022

Closes #1374

I have tested that this works with AWS, GCP and local gateways.

@vponline vponline requested a review from a team September 5, 2022 11:26
@vponline vponline self-assigned this Sep 5, 2022
@vponline vponline force-pushed the remove-gateway-api-keys branch 2 times, most recently from d5a5270 to 66b0bc5 Compare September 8, 2022 19:38
Copy link
Contributor

@amarthadan amarthadan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the default UUID LGTM 👍

packages/airnode-node/src/workers/local-gateways/server.ts Outdated Show resolved Hide resolved
@vponline vponline merged commit 9bbc2ac into temp-v0.10.0 Sep 9, 2022
@vponline vponline deleted the remove-gateway-api-keys branch September 9, 2022 07:29
@vponline vponline linked an issue Sep 9, 2022 that may be closed by this pull request
@martinkolenic
Copy link
Contributor

Hi @vponline, I noticed that API keys are still required for heartbeat; will this be changing as well? It seems to me from an outsider's perspective that it would be more consistent; that said, there might be more compelling reasons to keep it. I'm still testing this change at the moment; I'll let you know about the results and testcases as soon as I'm done.

@vponline
Copy link
Contributor Author

Hi @vponline, I noticed that API keys are still required for heartbeat; will this be changing as well? It seems to me from an outsider's perspective that it would be more consistent; that said, there might be more compelling reasons to keep it. I'm still testing this change at the moment; I'll let you know about the results and testcases as soon as I'm done.

Good question @martinkolenic , the heartbeat will remain as is with api keys since the idea is that API providers can setup their own heartbeat-receiving endpoints using the more traditional 'api key in header' authorization approach) 😄

Siegrift pushed a commit that referenced this pull request Nov 3, 2022
…1418)

* Remove gateway keys from validator and configs

* Remove gateway keys from local handlers, examples, request headers, gcp verification

* Add gateway path_key uuid to deployer, terraform and openapi templates

* Add pathKey to local gateway server

* Remove unused path_key variable from terraform, add uuid to local gateway docs, fix example secrets file, fix openApi template paths

* Increase npm registry ping delay

* Fix GCP gateway output url

* Generate gateway uuid with terraform random_uuid

* Uuse constant pathKey in local gateways

* Merge branch temp-v0.10.0 into remove-gateway-api-keys

* Update local gateway pathKey constant
Siegrift added a commit that referenced this pull request Nov 8, 2022
* Avoid constants with side effects (#1394)

* Remove constants test

* Fix flaky test

One of the unsafe evaluate test is flaky because the setInterval used
internally might be potentially be called 4 times until the evaluation
is suspended by the node VM. This fix is to change the tick period to
make this even less probable.

* Use API_CALL_TIMEOUT constant in tests

* Remove API_CALL_TOTAL_TIMEOUT

* Add worker timeout test

* Refactor airnode-utilities timeouts

* Rename default timeout to default blockchain call timeout

* Add changeset

* Fix lint

* Remove unused delay configuration for deployer handlers

* Merge pull request #1396 from api3dao/remove-heartbeatId

Remove heartbeatId

* Heartbeat signature (#1398)

* Add heartbeat signing

* Add changeset

* Use timestamp in heartbeat signature

* Heartbeat data (#1415)

* Add heartbeat signing

* Add changeset

* Use timestamp in heartbeat signature

* Add airnode_address, cloud_provider, stage, region to heartbeat payload

* Add changeset

* Remove airnode_address from heartbeat payload

* Fix martin github account

* Move from API keys to route-based authentication for HTTP gateways (#1418)

* Remove gateway keys from validator and configs

* Remove gateway keys from local handlers, examples, request headers, gcp verification

* Add gateway path_key uuid to deployer, terraform and openapi templates

* Add pathKey to local gateway server

* Remove unused path_key variable from terraform, add uuid to local gateway docs, fix example secrets file, fix openApi template paths

* Increase npm registry ping delay

* Fix GCP gateway output url

* Generate gateway uuid with terraform random_uuid

* Uuse constant pathKey in local gateways

* Merge branch temp-v0.10.0 into remove-gateway-api-keys

* Update local gateway pathKey constant

* Fix lint and tests

Co-authored-by: vponline <[email protected]>
@dcroote dcroote restored the remove-gateway-api-keys branch November 14, 2022 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move from API keys to route-based authentication for HTTP gateways
3 participants